<template>
    <el-tooltip
        class="item"
        effect="dark"
        :content="content"
        placement="top-start"
        :open-delay="500"
        :disabled="disabled"
    >
        <el-button
        :type="type"
        :icon="icon"
        @click="btnClick"
        >
        <slot></slot>
        </el-button>
    </el-tooltip>
</template>
<script>
export default {
    props:{
        content:{
            type:String,
            default:""
        },
        icon:{
            type:String,
            default:""
        },
        type:{
            type:String,
            default:""
        },
        disabled:{
            type:Boolean,
            default:false
        }
    },
    methods:{
        btnClick(){
            this.$emit("change")
        }
    }
}
</script>
<style lang="scss" scoped>
    .el-tooltip.el-button{
        padding:8px;
    }
</style>